package com.wenhao.meituan.interview;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author Wenhao Tong
 * @create 2021-08-08 10:18
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        StringBuilder stringBuilder = new StringBuilder();
        char pre = s.charAt(0);
        stringBuilder.append(s.charAt(0));
        for (int i = 1;i < s.length();i++) {
            char c = s.charAt(i);
            if (c == ' ' || c == pre) {
                continue;
            }
            stringBuilder.append(c);
            pre = c;
        }
        System.out.println(stringBuilder);
    }
}
